"""3rd

Revision ID: 03af83010db0
Revises: 6d540410cf42
Create Date: 2025-10-28 21:06:21.146884

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '03af83010db0'
down_revision: Union[str, Sequence[str], None] = '6d540410cf42'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('tb_students', sa.Column('dept_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'tb_students', 'tb_departments', ['dept_id'], ['id'])
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'tb_students', type_='foreignkey')
    op.drop_column('tb_students', 'dept_id')
    # ### end Alembic commands ###
